Dear DOORS Experts, Date dateOfInterest = dateOnly(today) Filter f = attribute "Last Modified On" >= dateOfInterest
vasgyuszi - Thu Sep 30 09:56:20 EDT 2010 |
Re: Filter on system attribute "Last Modified On" the variable (to what will be the attribute compared) shall have 'string' type and not 'Date'. BUT the attribute 'Last Modified On' HAS the type of Date. Every logical and correctly implementeg programming language does comparing between identical types, but thic crappy DXL of course not. And of course it's nowhere documented. .... I could say some rude words... This very poor documentation costs alot of money for the projects they using DXL... |
Re: Filter on system attribute "Last Modified On" vasgyuszi - Fri Oct 01 03:19:41 EDT 2010 at "if" comparison shall be both variables from the same type (in my cas both Date): if (<Date> >= <Date>){ ... } BUT for building a filter: Filter f = attribute "Last Modified On" >= <string> Who understands it??? |
Re: Filter on system attribute "Last Modified On" vasgyuszi - Fri Oct 01 06:52:31 EDT 2010
The reason is the DXL syntax. It is not only for filtering, also for the default value in attribute creation. DOORS uses undocumented datatypes to enable its syntax. Example: AttrDef ad = create object attribute "NewAttribute" of type "Text"
AttrDef create (AttrDef__) AttrDef__ object (AttrDef__) AttrDef__ attribute (string) _y of (_y) AttrType__ type (string) AttrDef__ ::.. (AttrDef__, AttrType__) AttrDef__ ::.. (AttrType__, AttrDef__)
AttrDef__ ::.. (AttrMultiVal__, AttrDef__) AttrDef__ ::.. (AttrMultiVal__, AttrDef__) AttrDef__ ::.. (AttrDefVal__, AttrDef__) AttrDef__ ::.. (AttrLocaleVal__, AttrDef__) AttrDef__ ::.. (AttrDef__, AttrDescVal__) AttrDef__ ::.. (AttrDef__, AttrInhVal__) AttrDef__ ::.. (AttrDef__, AttrBarsVal__) AttrDef__ ::.. (AttrDef__, AttrDateVal__) AttrDef__ ::.. (AttrDescVal__, AttrDef__) AttrDef__ ::.. (AttrDef__, AttrLocaleVal__) AttrDef__ ::.. (AttrDxlVal__, AttrDef__) AttrDef__ ::.. (AttrDateVal__, AttrDef__) AttrDef__ ::.. (AttrHideVal__, AttrDef__) AttrDef__ ::.. (AttrHistVal__, AttrDef__) AttrDef__ ::.. (AttrDef__, AttrDxlVal__) AttrDef__ ::.. (AttrDef__, AttrHistVal__) AttrDef__ ::.. (AttrInhVal__, AttrDef__) AttrDef__ ::.. (AttrBarsVal__, AttrDef__) AttrDef__ ::.. (AttrDef__, AttrHideVal__) AttrDef__ ::.. (AttrDef__, AttrDefVal__) AttrDef__ ::.. (AttrDef__, AttrMultiVal__) AttrInhVal__ inherit (bool) AttrDateVal__ date (bool) AttrDxlVal__ dxl (string) AttrDescVal__ description (string) AttrHistVal__ history (bool) AttrHideVal__ hidden (bool) AttrType__ type (string) AttrMultiVal__ multi (bool) AttrLocaleVal__ locale () AttrDefVal__ default (string) AttrBarsVal__ changeBars (bool)
Filter ::== (undocumentedType__, Date) Filter ::== (undocumentedType__, int ) Filter ::== (undocumentedType__, string) ... undocumentedType__ attribute (string)
Filter ::== (Fattr_ f, Date x) { return (f == stringOf (x, "MM/dd/yyyy")) }
Date d = today()
Filter F = attribute "Created On" == d
set F
filtering on
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: Filter on system attribute "Last Modified On" I am new to DXL, and after reading this last thread, I have a question regarding the system object attribute "Last Modified On". Is the date value returned from "Last Modified On" able to be compared to date value returned from the getdate() function ? |
Re: Filter on system attribute "Last Modified On" Temperance - Sat May 05 11:37:28 EDT 2012 Historically this attribute, inexplicitely, only remembered the day of the change, not the time. Recently they added the capability to remember the time as well, but in order to preserve functionality of older DXL script, getting the value by definition only gets the Date. The getDateAndTime() function, et tal, will remedy that but it requires two statements rather than just one. -Louie |
Re: Filter on system attribute "Last Modified On" llandale - Sat May 05 16:58:00 EDT 2012 Thank you for your response. So if I understand what you are saying correctly, "last Modified On" returns time and date, while getDate() only returns the date, with no time info. If I want to compare just date information couldn't I use the dateOnly() function, like this ? Date someday = dateOnly(Object."Last Modified On") then compare it with the return value from getDate() (only because I couldn't find the getDateAndTime() function you referred to in your post) What do you think ? Thanks - Temperance |
Re: Filter on system attribute "Last Modified On" Temperance - Sat May 05 19:28:26 EDT 2012 Looks like I was wrong:
Object oCurr = current int cSecsInDay = 60*60*24 Date Today = dateOnly(dateOf(intOf(today()))) Date Yestr = dateOnly(dateOf(intOf(today())-cSecsInDay)) Date ModOn = oCurr."Last Modified On" print (dateAndTime(ModOn)) " \t" ModOn "\t" dateOnly(ModOn) "\n" if (Today == ModOn) then print "Object modified sometime today\n" elseif(Yestr == ModOn) then print "Object modified sometime yesterday\n"
|